package com.shujia.flink.tf;

import org.apache.flink.api.common.functions.MapFunction;

//自定义类，实现MapFunction接口
public class AgeMapFunction implements MapFunction<String, Integer> {
    @Override
    public Integer map(String value) throws Exception {
        //取出年龄
        String age = value.split(",")[2];
        //转换成int类型返回
        return Integer.parseInt(age);
    }
}

